﻿<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8" />
    <title>验证用户输入</title>
    <script type="text/javascript" src="Scripts/angular.js"></script>
</head>
<body>
    <!--<form ng-app="" name="myForm">
        Email:
        <input type="email" name="myAddress" ng-model="text">
        <span ng-show="myForm.myAddress.$error.email">不是一个合法的邮箱地址</span>
    </form>-->

    <p>应用状态</p>
    <form ng-app="" name="myForm" ng-init="myText = 'test@runoob.com'">

        Email:
        <input type="email" name="myAddress" ng-model="myText" required>
        <p>编辑邮箱地址，查看状态的改变。</p>
        <h1>状态</h1>
        <p>Valid: {{myForm.myAddress.$valid}} (如果输入的值是合法的则为 true)。</p>
        <p>Dirty: {{myForm.myAddress.$dirty}} (如果值改变则为 true)。</p>
        <p>Touched: {{myForm.myAddress.$touched}} (如果通过触屏点击则为 true)。</p>

    </form>
</body>
</html>